// @ts-ignore
/* eslint-disable */
import { request } from '@umijs/max';

// 新增文件夹
export async function addMyFolder(data: Partial<API.MyFolder>) {
  return request('/prompt/my-folder', {
    method: 'POST',
    data,
  });
}

// 更新文件夹
export async function updateMyFolder(id: string, data: Partial<API.MyFolder>) {
  return request(`/prompt/my-folder/${id}`, {
    method: 'PUT',
    data,
  });
}

// 删除文件夹
export async function deleteMyFolder(id: string) {
  return request(`/prompt/my-folder/${id}`, {
    method: 'DELETE',
  });
}

// 查询所有文件夹
export async function getAllMyFolders() {
  return request(`/prompt/my-folder`, {
    method: 'GET',
  });
}
